This is an interactive dashboard set up to visualize the Baseline GCAM model results for the five different soil carbon scenarios (FAO Glosis (Series 84), Houghton (Series 85), Harmonized World Soils Database (Series 86), Soil Grids 2017 (Series 87), and Soil Grids 2020(Series 89)).
There are 5 tabs, this initial Read Me, and the Baseline Scenarios, which have the actual numbers associated with each of the simulations)
The Net and cumulative Emissions, Soil Emission Plots, Vegetative Plots, and Land Use Plots show the different value of the corn and soy shocks in relative to the baseline scenarios.
The initialization parameters for each model are listed below. Each plot is clickable, and lines can be toggled on and off, zoomed in on, and panned.
In the Missouri River Basin, the biggest land use changes in the future timesteps involve the transition from unmanaged pasture to cropland. This difference of the initial parameters: Unmanaged Pasture - Cropland. In all of these results, the order of the results match the order of this change, largest to smallest in this order. The magnitude and oscillations differ in size, but the order does not.
| Land | FAO | Houghton | HWSD | SG17 | SG20 |
|---|---|---|---|---|---|
| Series | 84 | 85 | 86 | 87 | 89 |
| Cropland | 6.98 | 4.65 | 6.15 | 7.76 | 6.28 |
| Forest | 6.2 | 8.42 | 5.34 | 9.92 | 4.97 |
| Grassland | 6.04 | 6.32 | 5.3 | 7.64 | 5.89 |
| Pasture | 3.83 | 6.04 | 4.6 | 6.58 | 4.51 |
| Shrubland | 2.24 | 3.1 | 4.14 | 5.5 | 3.56 |
| Urban | 6.01 | 3.02 | 6.13 | 5.8 | 4 |
Definitions
NET Emissions: Soil + Vegetative Carbon added together for the current year
CUMULATIVE Emissions: 2015 as year 1, to 2060, adding the current years net emissions to the sum of the previous years
Future Baseline Scenarios:
Net and Cumulative Emissions:
Soil Emission Plots:
Vegetative Plots:
Land Use Plots:
---
title: "Missouri Basin Corn and Soy Shocks"
author: "Mandy Liesch"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source_code: embed
---
```{r setup, include=FALSE}
library(ggplot2)
library(plotly)
library(knitr)
library(plyr)
library(flexdashboard)
library(tidyverse)
library(ggnewscale)
library(kableExtra)
```
```{r}
#Load the color palettes and files
#Read in the land use files
landUse<-read_csv("LandUse_Shocks.csv")
#Read in the Vegetative Shock File
vegShocks<-read_csv("Vegetative_Shocks.csv")
#Read in the Land Use Color plots
LUColors <- c("UrbanLand"="#C80813FF", "Urban"="#C80813FF", "Tundra"="#71D0F5FF",
"Rock/Ice/Desert"="#8A9197FF", "Cropland" = "#FED439FF",
"HarvCropLand"="#FED439FF", "Harvested Cropland"="#FED439FF",
"OtherArableLand" = "#D2AF81FF", "Other Arable Land" = "#D2AF81FF",
"Pasture"= "#FD8CC1FF", "UnmanagedPasture"="#370335FF",
"Unmanaged Pasture"="#370335FF",
"Grassland" = "#46732EFF", "Forest" = "#075149FF",
"Shrubland" = "#F05C3BFF", "otherNotArable"="#8A9197FF")
# Vegetative Based Color Palette
vegCEmissions<-c("#46732EFF")
# Model Based Color Pallete
ModelColors<- c("FAO"="#370335FF", "Houghton" = "#FED439FF",
"GCAM" = "#FED439FF", "HWSD"="#1A9993FF", "SG17" = "#197EC0FF",
"SG20"="#F05C3BFF")
#Vegetative Subsets
#Break up the land leaf columns into subsets
#(each land leaf has 4 different categories)
new_LU<-landUse %>%
separate(LandLeaf, c("LandUse", "Basin", "Water", "Input")) %>%
#split the scenario column by data
separate(scenario, into = c('scenario', 'date'), sep = ",") %>%
#Select everything but date, basin and units
select(-c("date", "Basin", "Units"))
#Sum together all of the land leaf files by land use type
sum_new_LU<- new_LU %>%
group_by(scenario, LandUse) %>%
summarise(across(where(is.numeric), sum))
#Reclassify land use types into broader categories
cat_LU<-sum_new_LU %>%
mutate(Category = case_when(
#Cropland category
LandUse %in%
#Biomass Crops
c("biomassGrass", "biomassTree",
#Fodder Crops
"FodderGrass", "FodderHerb",
#Grain Crops
"Corn", "Soybean", "Wheat", "OtherGrain",
#Oil Crops
"OilCrop", "Rapeseed",
#Other Crops
"FiberCrop", "MiscCrop", "RootTuber", "SugarCrop")
#Land Use Name
~ "HarvCropLand",
#Other Arable Land
LandUse == "OtherArableLand" ~"OtherArableLand",
#Forest categories
LandUse %in% c("Forest", "UnmanagedForest", "ProtectedUnmanagedForest")
~ "Forest",
#Grassland categories
LandUse %in% c("Grassland", "ProtectedGrassland") ~ "Grassland",
#Pasture category
LandUse=="Pasture" ~ "Pasture",
#Unamanged pasture category
LandUse %in% c("ProtectedUnmanagedPasture", "UnmanagedPasture")
~ "UnmanagedPasture",
#Shrubland category
LandUse %in% c("Shrubland", "ProtectedShrubland") ~ "Shrubland",
#Other categories
LandUse=="Tundra" ~ "Tundra",
LandUse=="UrbanLand" ~ "UrbanLand",
#Default Return Statement
TRUE~NA_character_
)
)
#Sum everything up by defined land use category
sum_cat_LU<-cat_LU %>%
group_by(scenario, Category) %>%
summarise(across(where(is.numeric), sum))
#Create a long dataframe with land use, years, and area
wide_sum_LU<-sum_cat_LU %>%
pivot_longer(!c(scenario, Category), names_to=c("year"), values_to = "area") %>%
#convert years into the numeric values
mutate(year = as.numeric(year)) %>%
pivot_wider(names_from = scenario, values_from = c(area)) %>%
mutate(DifCornShock = CORN1BG - BASE) %>%
mutate(DifSoyShock = SOY1BG - BASE) %>%
group_by(Category) %>%
mutate(CumSumCornLand = cumsum(DifCornShock)) %>%
mutate(CumSumSoyLand = cumsum(DifSoyShock)) %>%
mutate(Category = recode(Category, HarvCropLand = "Harvested Cropland",
OtherArableLand = "Other Arable Land",
UnmanagedPasture = "Unmanaged Pasture",
UrbanLand = "Urban"
)
)
#Break up the land leaf columns into subsets
#(each land leaf has 4 different categories)
new_veg<-vegShocks %>%
separate(LandLeaf, c("LandUse", "Basin", "Water", "Input")) %>%
separate(scenario, into = c('scenario', 'date'), sep = ",") %>%
select(-c("date", "Basin", "Units"))
#Sum together all of the land leaf files by land use type
sum_new_veg<- new_veg %>%
group_by(scenario, LandUse) %>%
summarise(across(where(is.numeric), sum))
#Reclassify land use types into broader categories
cat_veg<-sum_new_veg %>%
mutate(Category = case_when(
#Cropland category
LandUse %in%
#Biomass Crops
c("biomassGrass", "biomassTree",
#Fodder Crops
"FodderGrass", "FodderHerb",
#Grain Crops
"Corn", "Soybean", "Wheat", "OtherGrain",
#Oil Crops
"OilCrop", "Rapeseed",
#Other Crops
"FiberCrop", "MiscCrop", "RootTuber", "SugarCrop")
#Land Use Name
~ "HarvCropLand",
#Other Arable Land
LandUse == "OtherArableLand" ~"OtherArableLand",
#Forest categories
LandUse %in% c("Forest", "UnmanagedForest", "ProtectedUnmanagedForest")
~ "Forest",
#Grassland categories
LandUse %in% c("Grassland", "ProtectedGrassland") ~ "Grassland",
#Pasture category
LandUse=="Pasture" ~ "Pasture",
#Unamanged pasture category
LandUse %in% c("ProtectedUnmanagedPasture", "UnmanagedPasture")
~ "UnmanagedPasture",
#Shrubland category
LandUse %in% c("Shrubland", "ProtectedShrubland") ~ "Shrubland",
#Other categories
LandUse=="Tundra" ~ "Tundra",
LandUse=="UrbanLand" ~ "UrbanLand",
#Default Return Statement
TRUE~NA_character_
)
)
#Sum everything up by defined land use category
sum_cat_veg<-cat_veg %>%
group_by(scenario, Category) %>%
summarise(across(where(is.numeric), sum)) %>%
select(scenario:'2060')
#Create a long dataframe with land use, years, and area
wide_sum_veg<-sum_cat_veg %>%
pivot_longer(!c(scenario, Category), names_to=c("year"), values_to = "area") %>%
#convert years into the numeric values
mutate(year = as.numeric(year)) %>%
pivot_wider(names_from = scenario, values_from = c(area)) %>%
mutate(DifCornShock = CORN1BG - BASE) %>%
mutate(DifSoyShock = SOY1BG - BASE) %>%
group_by(Category) %>%
mutate(cumSumCornVeg= cumsum(DifCornShock))%>%
mutate(cumSumSoyVeg= cumsum(DifSoyShock)) %>%
mutate(Category = recode(Category, HarvCropLand = "Harvested Cropland",
OtherArableLand = "Other Arable Land",
UnmanagedPasture = "Unmanaged Pasture",
UrbanLand = "Urban"
)
)
#Create a series loop to read in all of the data
#Create a list of all .csv files in the output folder
files <- list.files(path="~/github/GCAMShocks/GCAM_Shocks/Shocks", pattern = "\\values.csv$",
full.names = TRUE)
#Initialize an empty list to store data frames
data_list <- list()
# Loop over each file and read it into a data frame
for (file in files) {
data <- read.csv(file)
data_list[[file]] <- data
}
# Combine all data frames into one
combined_shock_soil_data <- bind_rows(data_list)
new_Soil_Shock_Emiss<- combined_shock_soil_data %>%
separate(LandLeaf, c("LandUse", "Basin", "Water", "Input")) %>%
separate(scenario, into = c('scenario', 'date'), sep = ",") %>%
select(-c("date", "region", "Basin", "Units")) %>%
select(Series:'X2060')
#Sum together all of the land leaf files by land use type
sum_new_Soil_Emiss<- new_Soil_Shock_Emiss %>%
group_by(Series, scenario, LandUse) %>%
summarise(across(where(is.numeric), sum))
#Reclassify land use types into broader categories
cat_Soil_Emiss<-sum_new_Soil_Emiss %>%
mutate(Category = case_when(
#Cropland category
LandUse %in%
#Biomass Crops
c("biomassGrass", "biomassTree",
#Fodder Crops
"FodderGrass", "FodderHerb",
#Grain Crops
"Corn", "Soybean", "Wheat", "OtherGrain",
#Oil Crops
"OilCrop", "Rapeseed",
#Other Crops
"FiberCrop", "MiscCrop", "RootTuber", "SugarCrop")
#Land Use Name
~ "HarvCropLand",
#Other Arable Land
LandUse == "OtherArableLand" ~"OtherArableLand",
#Forest categories
LandUse %in% c("Forest", "UnmanagedForest", "ProtectedUnmanagedForest")
~ "Forest",
#Grassland categories
LandUse %in% c("Grassland", "ProtectedGrassland") ~ "Grassland",
#Pasture category
LandUse=="Pasture" ~ "Pasture",
#Unamanged pasture category
LandUse %in% c("ProtectedUnmanagedPasture", "UnmanagedPasture")
~ "UnmanagedPasture",
#Shrubland category
LandUse %in% c("Shrubland", "ProtectedShrubland") ~ "Shrubland",
#Other categories
LandUse=="Tundra" ~ "Tundra",
LandUse=="UrbanLand" ~ "UrbanLand",
#Default Return Statement
TRUE~NA_character_
)
)
#Sum everything up by defined land use category
sum_cat_soil_emiss<- cat_Soil_Emiss %>%
group_by(Series, scenario, Category) %>%
summarise(across(where(is.numeric), sum))
#Create a long dataframe with land use, years, and area
wide_sum_soil_emiss<- sum_cat_soil_emiss %>%
pivot_longer(!c(Series, scenario, Category), names_to=c("year"), values_to = "area") %>%
#Remove the extra X value from the dataset
mutate(across(c('year'), substr, 2, nchar(year))) %>%
#convert years into the numeric values
mutate(year = as.numeric(year)) %>%
pivot_wider(names_from = scenario, values_from = c(area)) %>%
mutate(DifCornShock = CORN1BG - BASE) %>%
mutate(DifSoyShock = SOY1BG - BASE) %>%
mutate(Category = recode(Category, HarvCropLand = "Harvested Cropland",
OtherArableLand = "Other Arable Land",
UnmanagedPasture = "Unmanaged Pasture",
UrbanLand = "Urban"
)
) %>%
mutate(Series = recode(Series, GCAM = "Houghton"))
cum_soil_emiss_sums<-wide_sum_soil_emiss %>%
group_by(Series, year) %>%
summarise(across(where(is.numeric), sum)) %>%
#calculate the cumulative emissions
mutate(aggDifCorncount = cumsum(DifCornShock)) %>%
mutate(aggDifSoycount = cumsum(DifSoyShock))
mergedData<-merge(wide_sum_soil_emiss, wide_sum_veg,
by=c("Category", "year"), all=TRUE) %>%
#rename all of the columns after the merge
rename( c( "BASE.soil" ="BASE.x",
"BASE.veg" = "BASE.y",
"CORN1BG.soil" = "CORN1BG.x",
"CORN1BG.veg" = "CORN1BG.y",
"SOY1BG.soil" = "SOY1BG.x",
"SOY1BG.veg" = "SOY1BG.y",
"DifCornShock.soil" = "DifCornShock.x",
"DifSoyShock.soil" = "DifSoyShock.x",
"DifCornShock.veg" = "DifCornShock.y",
"DifSoyShock.veg" = "DifSoyShock.y" )) %>%
mutate(netDifCornShock = DifCornShock.soil + DifCornShock.veg) %>%
mutate(netDifSoyShock = DifSoyShock.soil + DifSoyShock.veg)
sum_merged_data <- mergedData %>%
group_by(Series, year) %>%
dplyr::summarise(across(where(is.numeric), sum)) %>%
group_by(Series) %>%
dplyr::mutate(aggNetSumDifCorncount = cumsum(netDifCornShock)) %>%
dplyr::mutate(aggNetSumDifSoycount = cumsum(netDifSoyShock)) %>%
dplyr::mutate(BASENetEmiss = BASE.soil + BASE.veg) %>%
group_by(Series) %>%
filter(year >2015) %>%
dplyr::mutate(BASECumNetEmiss = cumsum(BASENetEmiss)) %>%
mutate(Series = recode(Series, GCAM = "Houghton"))
```
Read Me
=======================================================================
Row
-----------------------------------------------------------------------
### Information
This is an interactive dashboard set up to visualize the Baseline GCAM model results for the five different soil carbon scenarios (FAO Glosis (Series 84), Houghton (Series 85), Harmonized World Soils Database (Series 86), Soil Grids 2017 (Series 87), and Soil Grids 2020(Series 89)).
There are 5 tabs, this initial Read Me, and the Baseline Scenarios, which have the actual numbers associated with each of the simulations)
The Net and cumulative Emissions, Soil Emission Plots, Vegetative Plots, and Land Use Plots show the different value of the corn and soy shocks in relative to the baseline scenarios.
The initialization parameters for each model are listed below. Each plot is clickable, and lines can be toggled on and off, zoomed in on, and panned.
In the Missouri River Basin, the biggest land use changes in the future timesteps involve the transition from unmanaged pasture to cropland. This difference of the initial parameters: Unmanaged Pasture - Cropland. In all of these results, the order of the results match the order of this change, largest to smallest in this order. The magnitude and oscillations differ in size, but the order does not.
- Houghton: 1.39 kg/m^2
- SG17: -1.18 kg/m^2
- HWSD: -1.55 kg/m^2
- SG20: -1.77 kg/m^2
- FAO GLOSIS: -3.15 kg/m^2
### Initial Parameters
```{r}
Land <- c("Series","Cropland","Forest","Grassland","Pasture","Shrubland", "Urban")
FAO <- c('84', 6.98, 6.20, 6.04, 3.83, 2.24, 6.01)
Houghton <-c('85', 4.65, 8.42, 6.32, 6.04, 3.10, 3.02)
HWSD <- c('86', 6.15, 5.34, 5.30, 4.60, 4.14, 6.13)
SG17 <- c("87", 7.76, 9.92, 7.64, 6.58, 5.50, 5.80)
SG20 <- c("89", 6.28, 4.97, 5.89, 4.51, 3.56, 4.00)
df <- data.frame(Land, FAO, Houghton, HWSD, SG17, SG20)
df %>% mutate_if(is.numeric, format, digits=3) %>%
kbl(align = "c") %>% kable_material(c("striped", "hover", full_width = F))
```
Row
-----------------------------------------------------------------------
### Tab Description
**Definitions**
*NET Emissions:* Soil + Vegetative Carbon added together for the current year
*CUMULATIVE Emissions:* 2015 as year 1, to 2060, adding the current years net emissions to the sum of the previous years
**Future Baseline Scenarios:**
- Baseline Land Use Change - Projected Area (Mha)
- Baseline Soil and Vegetative Emissions - Annual Mt Emissions of the Vegetative Carbon and soil carbon for all 5 models
- Net Baseline Emissions - for all 5 models
- Net Cumulative Baseline Emissions - Cumulative emissions from 2015 to 2060 for the reference scenario
**Net and Cumulative Emissions:**
- Total Net Corn Shock Emissions Over Baseline
- Total Net Soy Shock Emissions Over Baseline
- Total Cumulative Net Corn Shock Emissions Over Baseline
- Total Cumulative Net Soy Shock Emissions Over Baseline
### Tab Description Cont.
**Soil Emission Plots:**
- Total Corn Shock Emissions Over Baseline
- Total Soy Shock Emissions Over Baseline
- Soil Cumulative Corn Shock Emissions Over Baseline
- Soil Cumulative Soy Shock Emissions Over Baseline
**Vegetative Plots:**
- Corn Shock Vegetative Emission Change Over Baseline by Land Use Type
- Soy Shock Vegetative Change Over Baseline by Land Use Type
- Cumulative Corn Shock Vegetative Emission Change Over Baseline by Land Use Type
- Cumulative Soy Shock Vegetative Change Over Baseline by Land Use Type
**Land Use Plots:**
- Corn Shock Land Use Change Over Baseline by Land Use Type
- Soy Shock Land Use Change Over Baseline by Land Use Type
- Cumulative Corn Shock Land Use Change Over Baseline by Land Use Type
- Cumulative Soy Shock Land Use Change Over Baseline by Land Use Type
Future Baseline Scenarios
=======================================================================
Row
-----------------------------------------------------------------------
### Baseline Land Use Change
```{r}
LandUseAreaFuture.plt<- ggplot(wide_sum_LU %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2010),
aes(x=year, y=BASE, color=Category)) +
geom_line(size=2) +
#Set the legend to be on the bottom
theme(legend.position = "bottom")+
#Add a title
#ggtitle("A)Historic and Projected Land Use") +
#add the labels
labs(fill = "Land Use (Mha)", x='Year', y='Mha') +
#set the legend to be on one line
#guides(fill = guide_legend(nrow = 1)) +
#Use the custom designed color pallette and set names and labels
scale_color_manual(values=LUColors)
ggplotly(LandUseAreaFuture.plt)
```
### Baseline Soil and Vegetative Emissions
```{r}
#Calculate the future emissions plots
futureEmissions.plt<-ggplot(data=sum_merged_data %>%
filter(year >2015), aes(x=year))+
#Add a line plot for the soil emissions by series
geom_line(aes(y=BASE.soil,
group=Series, color=Series), lwd=2) +
#Add the custom color manual and labels
scale_color_manual(values=c(ModelColors)) +
#Add a line plot for the vegetative emissions
geom_line(aes(y=BASE.veg, color="Vegetation"), lwd=2) +
#Add the title
#ggtitle("Future Emissions") +
#Add the theme elements
#theme(plot.title = element_text(hjust = 0.5)) +
#Add the labels
labs( x='Year', y='Total Emissions (Mt)')
ggplotly(futureEmissions.plt)
```
Row
-----------------------------------------------------------------------
### Net Baseline Emissions
```{r}
#Calculate the net emissions plots by series
futNetEmissions.plt<-ggplot(data=sum_merged_data %>%
filter(year >2015),
aes(x=year, y=BASENetEmiss, group=Series))+
geom_line(aes(color=Series), lwd=2) +
#Add the custom color manual and labels
scale_color_manual(values=c(ModelColors, name = "Emissions"),
labels = c("FAO Glosis", "Houghton", "HWSD",
"SoilGrids 2017", "SoilGrids 2020")) +
#Add the title
#ggtitle("Future Net Emissions") +
#Add the theme elements
#theme(plot.title = element_text(hjust = 0.5)) +
#Add the labels
labs( x='Year', y='Total Emissions (Mt)')
ggplotly(futNetEmissions.plt)
```
### Net Cumulative Baseline Emissions
``` {r}
futCumNetEmissions.plt<-ggplot(data=sum_merged_data %>%
filter(year >2015),
aes(x=year, y=BASECumNetEmiss, group=Series))+
geom_line(aes(color=Series), lwd=2) +
#Add the custom color manual and labels
scale_color_manual(values=c(ModelColors, name = "Emissions"),
labels = c("FAO Glosis", "Houghton", "HWSD",
"SoilGrids 2017", "SoilGrids 2020")) +
#Add the title
#ggtitle("Future Net Emissions") +
#Add the theme elements
#theme(plot.title = element_text(hjust = 0.5)) +
#Add the labels
labs( x='Year', y='Total Emissions (Mt)')
ggplotly(futCumNetEmissions.plt)
```
Net and Cumulative Emissions
=======================================================================
Row
-----------------------------------------------------------------------
### Total Net Corn Shock Emissions Over Baseline
```{r}
net_emiss_CS_Models.plt<-ggplot(data= sum_merged_data %>%
filter(year > 2015),
aes(x=year, y=netDifCornShock, group=Series, color=Series))+
geom_line(aes(), size=2) +
#add a title
#ggtitle("Total Net Corn Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(net_emiss_CS_Models.plt)
```
### Total Net Soy Shock Emissions Over Baseline
```{r}
net_emiss_SS_Models.plt<-ggplot(data= sum_merged_data %>%
filter(year > 2015),
aes(x=year, y=netDifSoyShock, group=Series, color=Series))+
geom_line(aes(), size=2) +
#add a title
#ggtitle("Total Net Soy Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(net_emiss_SS_Models.plt)
```
Row
-----------------------------------------------------------------------
### Total Cumulative Net Corn Shock Emissions Over Baseline
```{r}
cum_net_emiss_CS_Models.plt<-ggplot(data= sum_merged_data %>%
filter(year > 2015),
aes(x=year, y=aggNetSumDifCorncount, group=Series, color=Series))+
geom_line(aes(), size=2) +
#add a title
#ggtitle("Total Cumulative Net Corn Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(cum_net_emiss_CS_Models.plt)
```
### Total Cumulative Net Soy Shock Emissions Over Baseline
```{r}
cum_net_emiss_SS_Models.plt<-ggplot(data= sum_merged_data %>%
filter(year > 2015),
aes(x=year, y=aggNetSumDifSoycount, group=Series, color=Series))+
geom_line(aes(), size=2) +
#add a title
#ggtitle("Total Cumulative Net soy Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(cum_net_emiss_SS_Models.plt)
```
Soil Emission Plots
=======================================================================
Row
-----------------------------------------------------------------------
### Total Corn Shock Emissions Over Baseline
```{r}
cum_soil_emiss_sums_CS_Models.plt<-ggplot(data= cum_soil_emiss_sums %>%
filter(year > 2015),
aes(x=year, y=DifCornShock, group=Series))+
geom_line(aes(color=Series), size=2) +
#add a title
#ggtitle("Total Corn Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
# Use hollow circles
ggplotly(cum_soil_emiss_sums_CS_Models.plt)
```
### Total Soy Shock Emissions Over Baseline
```{r}
cum_soil_emiss_sums_SS_Models.plt<-ggplot(data= cum_soil_emiss_sums %>%
filter(year > 2015),
aes(x=year, y=DifSoyShock, group=Series))+
geom_line(aes(color=Series), size=2) +
#add a title
#ggtitle("Total Soy Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(cum_soil_emiss_sums_SS_Models.plt)
```
Row
-----------------------------------------------------------------------
### Soil Cumulative Corn Shock Emissions Over Baseline
```{r}
tot_cum_soil_emiss_sums_CS_Models.plt<-ggplot(data= cum_soil_emiss_sums %>%
filter(year > 2015),
aes(x=year, y=aggDifCorncount, group=Series))+
geom_line(aes(color=Series), size=2) +
#add a title
#ggtitle("Soil Cumulative Corn Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
# Add a loess smoothed fit curve with confidence region
ggplotly(tot_cum_soil_emiss_sums_CS_Models.plt)
```
### Soil Cumulative Soy Shock Emissions Over Baseline
```{r}
tot_cum_soil_emiss_sums_SS_Models.plt<-ggplot(data= cum_soil_emiss_sums %>%
filter(year > 2015),
aes(x=year, y=aggDifSoycount, group=Series))+
geom_line(aes(color=Series), size=2) +
#add a title
#ggtitle("Soil Cumulative Soy Shock Emissions Over Baseline") +
#add labels
labs( x='Year', y='Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=ModelColors)
ggplotly(tot_cum_soil_emiss_sums_SS_Models.plt)
```
Vegetative Plots
=======================================================================
Row
-----------------------------------------------------------------------
### Corn Shock Vegetative Emission Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
CornShockVegLines.plt<-ggplot(data= wide_sum_veg %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=DifCornShock, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Corn Shock Vegetative Emission Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Vegetative Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(CornShockVegLines.plt)
```
### Soy Shock Vegetative Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
SoyShockVegUseLines.plt<-ggplot(data= wide_sum_veg %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=DifSoyShock, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Soy Shock Vegetative Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Vegetative Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(SoyShockVegUseLines.plt)
```
Row
-----------------------------------------------------------------------
### Cumulative Corn Shock Vegetative Emission Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
cumCornShockVegLines.plt<-ggplot(data= wide_sum_veg %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=cumSumCornVeg, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Corn Shock Vegetative Emission Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Vegetative Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(cumCornShockVegLines.plt)
```
### Cumulative Soy Shock Vegetative Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
cumSoyShockVegUseLines.plt<-ggplot(data= wide_sum_veg %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=cumSumSoyVeg, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Soy Shock Vegetative Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Vegetative Emissions (Mt)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(cumSoyShockVegUseLines.plt)
```
Land Use Plots
=======================================================================
Row
-----------------------------------------------------------------------
### Corn Shock Land Use Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
CornShockLandUseLines.plt<-ggplot(data= wide_sum_LU %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=DifCornShock, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Corn Shock Land Use Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Land Area (thous sq km)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(CornShockLandUseLines.plt)
```
### Soy Shock Land Use Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
SoyShockLandUseLines.plt<-ggplot(data= wide_sum_LU %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=DifSoyShock, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Soy Shock Land Use Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Land Area (thous sq km)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(SoyShockLandUseLines.plt)
```
Row
-----------------------------------------------------------------------
### Cumulative Corn Shock Land Use Change Over Baseline by Land Use Type
```{r}
#Create a spaghetti plot of land use area using area by category
CumCornShockLandUseLines.plt<-ggplot(data= wide_sum_LU %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=CumSumCornLand, group=Category))+
geom_line(aes(color=Category), size=2) +
scale_color_manual(values=LUColors) +
#add a title
#ggtitle("Corn Shock Land Use Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Land Area (thous sq km)')
ggplotly(CumCornShockLandUseLines.plt)
```
### Cumulative Soy Shock Land Use Change Over Baseline by Land Use Type
```{r}
CumSoyShockLandUseLines.plt<-ggplot(data= wide_sum_LU %>%
filter(Category !=c("Tundra")) %>%
filter(Category !=c("Urban")) %>%
filter(year >2015),
aes(x=year, y=CumSumSoyLand, group=Category))+
geom_line(aes(color=Category), size=2) +
#add a title
#ggtitle("Corn Shock Land Use Change Over Baseline by Land Use Type") +
#add labels
labs( x='Year', y='Land Area (thous sq km)') +
#use the custom color pallette
scale_color_manual(values=LUColors, name = "Land Use",
labels = c( "Forest", "Grassland", "Harvested Cropland",
"Other Arable Land", "Pasture", "Shrubland",
"Tundra", "Unmanaged Pasture", "Urban Land"))
ggplotly(CumSoyShockLandUseLines.plt)
```